import http from '@/utils/httpRequest'

// datax分组管理

export function list (params) {
  return http({
    url: http.requestUrl('/api/dataxTypeGroup'),
    method: 'get',
    params
  })
}

export function fetched (params) {
  return http({
    url: http.requestUrl('/api/dataxTypeGroup/' + params),
    method: 'get'
  })
}

export function updated (data) {
  return http({
    url: http.requestUrl('/api/dataxTypeGroup/'),
    method: 'put',
    data
  })
}

export function created (data) {
  return http({
    url: http.requestUrl('/api/dataxTypeGroup/'),
    method: 'post',
    data
  })
}

export function deleted (data) {
  return http({
    url: http.requestUrl('/api/dataxTypeGroup/'),
    method: 'delete',
    params: data
  })
}

// 获取可选组名
export function getGroupOptions (params) {
  return http({
    url: http.requestUrl('/api/dataxTypeGroup/getGroupOptions'),
    method: 'get',
    params
  })
}

// 获取可选类型
export function getTypeOptions (params) {
  return http({
    url: http.requestUrl('/api/dataxTypeGroup/getTypeOptions'),
    method: 'get',
    params
  })
}
